﻿using System;
using System.Web.Http;
using System.Web.Http.ExceptionHandling;

using Zeus;
namespace Zeus.WebHost
{
    public class WebApiApplication
    {
        public void Application_Start(IExceptionHandler exceptionHandler = null, Action<HttpConfiguration> firstDo = null)
        {

            GlobalConfiguration.Configure((config) =>
            {
                if (firstDo != null)
                {
                    firstDo.Invoke(config);
                }

                if (exceptionHandler != null)
                {
                    //config.ConfigExceptionHandler(exceptionHandler);
                }
                config.MapHttpAttributeRoutes();
            });
        }
    }
}
